<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ include file="taglibs.jsp"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>${set.sysName}</title>
<script type="text/javascript" src="${pageContext.request.contextPath}/static/easyui/jquery.min.js"></script>
<script src="static/layer/layer.js"></script>
<link rel="stylesheet" href="${ctx}/static/css/style.css" type="text/css" />
</head>
<body>
	<div class="login-main">
		<!--顶部-->
		<div class="logintop">
			<div class="logotxt">EIOT物联网管控云平台</div>
			<div class="topright">
				<a href="#">关于EIOT</a>
				&nbsp;&nbsp;|&nbsp;&nbsp;
				<a href="#">在线帮助</a>
				&nbsp;|&nbsp;
				<a href="#">联系我们</a>
			</div>

		</div>
		<!--顶部-->
		<div class="loginmain">
			<div class="loginmainbox">
				<div class="loginbanner">
					<img src="${ctx}/static/images/system/banner1.png" height="380" width="520" />
				</div>
				<div class="login-CEE-loginBox">
					<form method="post" action="<c:url value='${ctx}/doLogin'/>" id="loginForm">
						<div class="title">欢迎登录EIOT物联网管控云平台</div>
						<div class="textBox">
							<div class="textBox_title">默认用户名：admin 密码：123456
								<span style="font-size:10px;color:red">${logerErrTxt}</span>
							</div>
							<div class="textBox_text">
								<input class="content-text" type="text" id="username" name="username" placeholder="用户名" value="${cookie.uname.value}"></input>
							</div>
							<div class="textBox_text">
								<input class="content-text" type="password" id="password" name="password" placeholder="密码" value="${cookie.pword.value}"></input>
							</div>
							<div class="textBox_check">
								<div class="textBox_check-lf">
									<input id="remindPWD" name="remindPWD" type="checkbox" value="1" checked="checked"/>
									&nbsp;记住密码
								</div>
								<div class="textBox_check-rg">
									<a href="#" onclick="forgetPW()">忘记密码</a>
								</div>
							</div>
							<div class="textBox_btn">
								<a id="sbmBtn">登&nbsp;录</a>
							</div>
							<div class="textBox_img">EIOT移动端即将推出，敬请期待！</div>
						</div>
					</form>
				</div>
			</div>
			<div class="login-CEE-third">
				<ul>
					<li class="login-CEE-third-list">
						<div class="login-CEE-third-list_lf">
							<img src="${ctx}/static/images/system/ico1.png" />
						</div>
						<div class="login-CEE-third-list_rg">
							灵活多变<br />满足多工况和场景配置
						</div>
					</li>
					<li class="login-CEE-third-list_01"><img src="${ctx}/static/images/system/img_04.jpg" width="1" height="50" /></li>
					<li class="login-CEE-third-list">
						<div class="login-CEE-third-list_lf">
							<img src="${ctx}/static/images/system/ico2.png" />
						</div>
						<div class="login-CEE-third-list_rg">
							丰富灵动<br />支持各行业应用解决方案
						</div>
					</li>
					<li class="login-CEE-third-list_01"><img src="${ctx}/static/images/system/img_04.jpg" /></li>
					<li class="login-CEE-third-list">
						<div class="login-CEE-third-list_lf">
							<img src="${ctx}/static/images/system/ico3.png" />
						</div>
						<div class="login-CEE-third-list_rg">
							主动服务<br />提供多角色运营管理模式
						</div>
					</li>
				</ul>
			</div>
		</div>

		<!--底部-->
		<div class="loginbottom">
			</br> <img src="${ctx}/static/images/system/login_logo.png" height="64" width="200" /></br> Copyright@2010-2016 武汉世纪飞赛软件有限公司 版权所有 技术支持：027-878888888
		</div>
	</div>
</body>
<script language="javascript">
$(function(){
	$("#sbmBtn").click(function(){
	 	if ($("#username").val().length==0) {
           	$('#error').text('用户名不能为空!');
           	return;
      	}
        if ($("#password").val().length==0) {
            $('#error').text('密码不能为空!');
            return;
        }
        $("#loginForm").submit();
        var index = layer.msg('登陆中', {icon: 16,shade: [0.1,'#fff']});
	});
}); 

var b = false;
var p = window;
if (p != p.parent) {
    b = true;
};
while (b) {
	if (p == p.parent) {
        p.location.href = "${ctx}/login";
        b = false;
    } else {
        p = p.parent;
    };
};
function forgetPW(){
	$.ajax({
		url:'${ctx}/forgetPW',
		success:function(data){
			location.reload()
		}
	})
}
$(document).keydown(function (event) {
    if (event.keyCode == 13) {
   	 	if ($("#username").val().length==0) {
          	$('#error').text('用户名不能为空.');
          	return;
    	}
    	if ($("#password").val().length==0) {
			$('#error').text('密码不能为空.');
          	return;
      	}
      	$("#loginForm").submit();
      	var index = layer.msg('登陆中', {icon: 16,shade: [0.1,'#fff']});
   	}
});
</script>
</html>